package com.rabbit.api;

import com.rabbit.api.exception.MessageRunTimeException;

import java.util.List;

/**
 * 生产者
 * @Author: 顾志杰
 */
public interface MessageProducer {
    /**
     * 发送消息
     * @param message
     * @throws MessageRunTimeException
     */
    void send(Message message) throws MessageRunTimeException;

    /**
     * 消息的发送 附带回调函数SendCallback
     * @param message
     * @param sendCallback
     * @throws MessageRunTimeException
     */
    void send(Message message,SendCallback sendCallback) throws MessageRunTimeException;

    /**
     * 批量发送消息
     * @param message
     * @throws MessageRunTimeException
     */
    void send(List<Message> message) throws MessageRunTimeException;


}
